//青蛙跳台阶问题

import java.util.Scanner;

public class Test22 {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        System.out.println("请输入青蛙跳的台阶数：");
        int num=scanner.nextInt();
        int s=func(num);
        System.out.println("青蛙跳台阶方法有"+s+"种");
    }

    private static int func(int num) {
        if(num==1){
            return 1;
        }else{
            return 2*func(num-1);
        }
    }
}
